package com.carleasoft.mps.adu.business.position.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.carleasoft.mps.adu.business.position.bean.entity.AuthorityPositionGroupEntity;
import com.carleasoft.mps.adu.business.position.bean.po.AuthorityPositionGroupPagePo;
import com.carleasoft.mps.adu.business.position.bean.po.AuthorityPositionGroupPo;
import com.carleasoft.mps.adu.business.position.bean.vo.AuthorityPositionGroupVo;
import com.carleasoft.mps.adu.business.position.bean.vo.PositionGroupVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>Description: positionGroup dao</p>
 * @since 2020-05-12
 * @author ztm
 */
@Repository
@Mapper
public interface AuthorityPositionGroupDao extends BaseMapper<AuthorityPositionGroupEntity> {
    /**
     * 分页查询岗位分组管理
     * @param page
     * @param authorityPositionGroupPo
     * @return
     */
    Page<PositionGroupVo> pageQuery(@Param("page") Page page, @Param("authorityPositionGroupPo") AuthorityPositionGroupPagePo authorityPositionGroupPo,@Param("top") String top);

    List<PositionGroupVo> treeList(@Param("authorityPositionGroupPo") AuthorityPositionGroupPo authorityPositionGroupPo,@Param("top") String top);

    int batchUpdateFullPath(@Param("searchChar") String searchChar , @Param("newChar") String newChar);

    int batchUpdateDeptCode(@Param("deptCode") String deptCode,@Param("fullPath") String fullPath);
}
